home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / architecture / ARCH_INCLUDE.h < prev    next >
C/C++ Source or Header  |  1991-12-04  |  891b  |  33 lines

  1. /*
  2.  * ARCH_INCLUDE.h -- helper macro for including architecture specific
  3.  * header files.
  4.  *
  5.  * Usage:
  6.  *    #import    ARCH_INCLUDE(prefix_dir/, suffix.h)
  7.  * Where:
  8.  *    ARCH_INCLUDE(prefix_dir/, suffix.h)
  9.  * produces (for m68k architecture):
  10.  *    "prefix_dir/m68k/suffix.h"
  11.  *
  12.  * NOTE: prefix_dir, if non-null, must end with a '/'
  13.  *
  14.  * Current deficiency: can't specify <...>, only "...".
  15.  *
  16.  * __TARGET_ARCHITECTURE__ may be defined to specify a different
  17.  * different architecture that the compiler is generating code for.
  18.  * Define __TARGET_ARCHITECTURE__ as a string, e.g.:
  19.  #    #define    __TARGET_ARCHITECTURE__    "m68k"
  20.  */
  21.  
  22. #ifndef    _ARCH_INCLUDE_H_
  23. #define    _ARCH_INCLUDE_H_
  24.  
  25. #ifndef    __TARGET_ARCHITECTURE__
  26. #define    __TARGET_ARCHITECTURE__    __ARCHITECTURE__
  27. #endif    __TARGET_ARCHITECTURE__
  28.  
  29. #define    ARCH_INCLUDE(prefix, suffix)    \
  30.     #prefix __TARGET_ARCHITECTURE__ "/" #suffix
  31.  
  32. #endif    _ARCH_INCLUDE_H_
  33.